package gof_002_结构型_Structural.gof_001_代理_Proxy.gof_002_StaticProxy;

public class Agent implements Singer{
    private Singer singer;

    public Agent(Singer singer) {
        this.singer = singer;
    }

    @Override
    public void sing() {
        connection();       //联系
        bargain();          //讨价还价
        payEarnestMoney();  //支付订金

        singer.sing();

        payBalanceDue();
    }
    private void connection() {
        System.out.println("经纪人在联系...");
    }
    private void bargain() {
        System.out.println("经纪人在讨价还价...");
    }
    private void payEarnestMoney() {
        System.out.println("经纪人在支付订金...");
    }
    private void payBalanceDue() {
        System.out.println("经纪人在支付尾款...");
    }

}